import java.util.Arrays;

public class Demo6 {
    public static void main(String args[]) {
        int[] nums = {1,3,4,6,2,2,3,4,1};
        System.out.println(singleNumber(nums));

    }
    public static int singleNumber(int[] nums) {
        int count = 0;
        for(int i : nums) {
            count = count ^ i;
        }
        return count;
    }
}

